package com.situ.web.service.impl;

import com.situ.web.dao.IStudentDao;
import com.situ.web.dao.impl.StudentDaoImpl;
import com.situ.web.pojo.Student;
import com.situ.web.pojo.vo.StudentBanjiVO;
import com.situ.web.service.IStudentService;

import java.util.List;

public class StudentServiceImpl implements IStudentService {
    private IStudentDao studentDao = new StudentDaoImpl();

    @Override
    public boolean add(Student student) {
        System.out.println("StudentServiceImpl.add");
        int count = studentDao.add(student);
        return count == 1 ? true : false;
    }

    @Override
    public List<StudentBanjiVO> selectAll() {
        return studentDao.selectAll();
    }
}
